# Maintainer: Alexey Pavlov <alexpux@gmail.com>

pkgname=yelp-xsl
pkgver=3.17.2
pkgrel=1
pkgdesc="Stylesheets for Yelp"
arch=('any')
license=('GPL')
url="http://www.gnome.org"
options=('strip' '!libtool' 'staticlibs')
makedepends=("libxml2-python" "libxslt-python" "intltool" "itstool")
source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/${pkgver:0:4}/${pkgname}-$pkgver.tar.xz)
sha256sums=('b4c6014c2b295e807205aaf13cd50d394e5ab1c8c1e082882b2172b0528b7ca3')

prepare() {
  cd ${srcdir}/${pkgname}-${pkgver}
  autoreconf -ivf
}

build() {
  mkdir -p ${srcdir}/build-${CHOST} && cd ${srcdir}/build-${CHOST}
  export PYTHON=/usr/bin/python2
  ${srcdir}/${pkgname}-${pkgver}/configure \
    --prefix=/usr \
    --build=${CHOST} \
    --host=${CHOST} \
    --sysconfdir=/etc \
    --localstatedir=/var

  make
}

check() {
  cd ${srcdir}/build-${CHOST}
  make -k check
}

package() {
  cd ${srcdir}/build-${CHOST}
  make DESTDIR="${pkgdir}" install
  mkdir -p ${pkgdir}/usr/lib
  mv ${pkgdir}/usr/share/pkgconfig ${pkgdir}/usr/lib/
}
